package com.daz.student.summary.server.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daz.student.dao.IStudentDao;
import com.daz.student.pojo.studentPojo;
import com.daz.student.server.IStudentServer;
import com.daz.student.summary.dao.ISummaryDao;
import com.daz.student.summary.pojo.SummaryPojo;
import com.daz.student.summary.server.ISummarySV;
import com.daz.teacher.teacherInfo.pojo.teacher;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@Service
public class SummarySV implements ISummarySV{
	@Autowired
	private ISummaryDao summaryDao;
	
	public List<SummaryPojo> searchSummaryList(Map<String, Object> searchConditionMap)  throws Exception {
		return summaryDao.searchSummaryList(searchConditionMap);
	}
	
	public PageInfo<SummaryPojo> searchSummaryList(Map<String, Object> searchConditionMap,int pageNum,int pageSize)  throws Exception{
		PageHelper.startPage(pageNum, pageSize);
		List<SummaryPojo> list = summaryDao.searchSummaryList(searchConditionMap);
		return new PageInfo<>(list);
	}

	public void insertSummary(SummaryPojo summary) throws Exception {
		// TODO Auto-generated method stub
		summaryDao.insertSummary(summary);
	}

	
	public void deleteSummary(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		summaryDao.deleteSummary(map);
	}

	
	public void updateSummary(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		summaryDao.updateSummary(map);
	}

	public SummaryPojo searchSummaryById(Map<String, Object> map)
			throws Exception {
		// TODO Auto-generated method stub
		return summaryDao.searchSummaryById(map);
	}

}
